package com.yanqu.data.entity;

import com.yanqu.road.entity.DataObject;
import com.yanqu.road.entity.FieldTypeAnnotation;

import java.util.List;
import java.util.Map;

/**
 * 玩家数据
 */
@FieldTypeAnnotation(tableName = "t_m_user_get_goods", desc = "玩家获取道具信息")
public class UserGoodsGetData extends DataObject {

    /**
     * 玩家id
     */
    @FieldTypeAnnotation(select = true, update = true, desc = "玩家id")
    private long userId;

    /**
     * vip等级，变动的
     */
    @FieldTypeAnnotation(desc = "vip等级，变动的")
    private int vip;

    /**
     * 重置时间
     */
    @FieldTypeAnnotation(desc = "重置时间")
    private long lastResetTime;

    //day, list
    @FieldTypeAnnotation(desc = "道具信息")
    private Map<Integer, List<GoodsGet>> goodsGetListMap;

    public long getUserId() {
        return userId;
    }

    public void setUserId(long userId) {
        if(this.userId != userId) {
            this.userId = userId;
            setUpdateOption();
        }
    }

    public int getVip() {
        return vip;
    }

    public void setVip(int vip) {
        if(this.vip != vip) {
            this.vip = vip;
            setUpdateOption();
        }
    }

    public long getLastResetTime() {
        return lastResetTime;
    }

    public void setLastResetTime(long lastResetTime) {
        if(this.lastResetTime != lastResetTime) {
            this.lastResetTime = lastResetTime;
            setUpdateOption();
        }
    }

    public Map<Integer, List<GoodsGet>> getGoodsGetListMap() {
        return goodsGetListMap;
    }

    public void setGoodsGetListMap(Map<Integer, List<GoodsGet>> goodsGetListMap) {
        this.goodsGetListMap = goodsGetListMap;
        setUpdateOption();
    }
}
